feat(vpto): add A2/A3 gather lowering#2
Closed
castigli wants to merge 3 commits into
Closed
Conversation
castigli
force-pushed
the
feature/a2a3-tgather-mgather-vpto
branch
3 times, most recently
from
July 16, 2026 15:05
f6615ce to
23d4248
Compare
castigli
force-pushed
the
feature/a2a3-tgather-mgather-vpto
branch
from
July 20, 2026 13:58
23d4248 to
1b99042
Compare
castigli
force-pushed
the
feature/a2a3-tgather-mgather-vpto
branch
from
July 21, 2026 11:39
1b99042 to
2f62fac
Compare
castigli
force-pushed
the
feature/a2a3-tgather-mgather-vpto
branch
from
July 21, 2026 11:42
2f62fac to
91e27d0
Compare
castigli
force-pushed
the
feature/a2a3-tgather-mgather-vpto
branch
from
July 21, 2026 13:15
91e27d0 to
796c9db
Compare
Owner
Author
|
Superseded by the canonical upstream PR: hw-native-sys#971 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pto.ub.vgather/pto.ub.vgatherbops and lower them to packedllvm.hivm.VGATHER{B}.b16/.b32calls.pto.tgatherindex form throughvmuls + vgather, preserving count-mode mask lifetime and chunking wide rows.pto.tgatherbwith CCE block-gather semantics: one compact 32B block address per output 32B block, padded to 8 address entries.Notes
tgatherbis a 32B block gather, not scalar gather. The offset tile uses compact i32 32B-aligned block addresses.tgatherindex form /vgather.mgatherremains out of scope because it is A5-only.Validation
ptoas/FileCheckgather lit checks: pass.Covered NPU shapes:
tgatherbf32:1x8,1x64,1x96,2x64,1x128,4x64tgatherbf16:1x16,1x128,1x192tgatherf32/f16:1x64,2x64,2x128